<?php /*a:1:{s:55:"D:\phpstudy_pro\WWW\night\app\demo\view\index\good.html";i:1602896930;}*/ ?>
<!doctype html>
<html>
<head>
	<title>oppo列表</title>
	<link rel="stylesheet" type="text/css" href="/static/css/oppo3.css">
	<link rel="stylesheet" type="text/css" href="/static/css/tongyong.css">
    <script src="/static/jquery.min.js"></script>
	<meta charset="utf-8" />
</head>
<body>
<div id="top" class="auto">
	<div class="nav">
		<div class="left same">
			<img src="/static/images/mainnav_l.gif">
		</div>
			<div class="main_nav">
				<img src="/static/images/logo.gif" id="logo" />
				<ul>
					<li><a href="index">首页</a></li>
					<li><a href="#">手机</a></li>
					<li><a href="#">耳机</a></li>
					<li><a href="#">配件</a></li>
					<li><a href="#">周边</a></li>
				</ul>
			</div>
		<div class="right same">
			<img src="/static/images/mainnav_r.gif">
		</div>
		<div>
			<img src="/static/images/main_line.gif">
		</div>
		<div class="nav1">
			<form class="search" action="#">
				<input class="keywords" type="text" name="keywords">
				<input class="top_btn" type="submit" value=""/>
			</form>
			<div class="nav1_1">
				<a href="#">登录</a>|
				<a href="#">注册</a>&nbsp&nbsp&nbsp
				<img src="/static/images/shoppingcart_sicon.png" />
				<a class="gouwuche" href="#">购物车</a>
			</div>			
		</div>
	</div>
</div>

<div id="main_liebiao" class="auto">
		当前位置：<a href="index">首页</a> > <a><?php echo htmlentities($list['goods_name']); ?></a>
</div>
<div id="details" class="auto">
	<div class="shopimg">
		<img src="/static/images/88_P_1363925352793.jpg"/>
	</div>
	<div class="shopdetails">
		<dl>
			<dt id="goods_name"><?php echo htmlentities($list['goods_name']); ?></dt>
			<dd>商品库存：1</dd>
			<dd>商品点击数：477</dd>
			<dd>用户评价：<img src="/static/images/stars5.gif" /></dd>
            <dd>商品单价：￥<b id="price"><?php echo htmlentities($list['price']); ?></b></dd>
			<dd>购买数量：<input class="count" size="1" value="1" type="text" /></dd>
			<dd>购买此商品可使用：100积分</dd>
			<dd>
				<a href="#" id="buy"><img src="/static/images/goumai2.gif" /></a>
				<a href="#" id="collect"><img src="/static/images/shoucang2.gif" /></a>
			</dd>
			
		</dl>
	</div>
</div>
<div style="clear:both;"></div>
<div id="neirong" class="auto">
	<p><?php echo htmlentities($list['describe']); ?></p>

</div>
<div id="bottom">
	<p>联系qq 305991138</p>
	<p>powered by&nbsp&nbsp&nbsp&nbsp<a href="#">陈昕晟</a></p>
</div>
</div>
</div>
</body>
<script>
    $(function () {
        $("#buy").click(function () {  //jquery模拟form表单提交
            var num = $(".count").val();
            var price = $("#price").text() * num;
            var goods_name = $("#goods_name").text();


			var params = {
					'price':price,
					'good_name':goods_name
			};

			var form = $("<form method='post'></form>");
			var input;
			form.attr({"action":'/demo/index/buy'});
			$.each(params,function (key,value) {
				input = $("<input type='hidden'>");
				input.attr({"name":key});
				input.val(value);
				form.append(input);
			});
			$(document.body).append(form);
			form.submit();


        })
    })

</script>
</html>